<template>
	<view class="page">
		<page-head :title="title"></page-head>
		<view class="uni-product-list">
			<view class="uni-product" v-for="(product,index) in productList" :key="index" @click="handleClick(index)">
				<view class="image-view">
					<image v-if="renderImage" class="uni-product-image" :src="product.image" mode="aspectFit"></image>
				</view>
				<view class="uni-product-title" style="text-align: center;font-size: 20px;">{{product.title}}</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
    data() {
        return {
            title: '招生就业',
			productList: [],
            renderImage: false
        };
    },
    methods: {
        loadData(action = 'add') {
            const data = [
                {
                    image: 'http://www.hngsxy.com/projectresources/wxapp/dept/zsw.png',
                    title: '招生网'
                    // originalPrice: 9999,
                    // favourPrice: 8888,
                    // tip: '自营'
                },
                {
                    image: 'http://www.hngsxy.com/projectresources/wxapp/dept/jyw.png',
                    title: '就业网'
                    // originalPrice: 3499,
                    // favourPrice: 3399,
                    // tip: '优惠'
                }
            ]
            if (action === 'refresh') {
                this.productList = []
            }

            data.forEach(item => {
                this.productList.push(item)
            });
        },
		handleClick(i){
			if (i === 0){
				uni.navigateTo({
					url: 'zsw'
				});
			} else if(i === 1) {
				vk.navigateTo({
					url: '/pages_bd/video_notice_new/gir_new?newsType=120,121,122,123,124,125,126,127,128,129&name=就业处'
				});
				// uni.navigateTo({
				// 	url: '../video_notice_new/gir_new?newsType=120,121,122,123,124,125,126,127,128,129&name=就业处'
				// });
			}
		}
    },
    onLoad() {
        this.loadData();
        setTimeout(()=> {
            this.renderImage = true
        }, 300)
    }
};
</script>

<style>
	
</style>
